package handlers

import (
	"github.com/gin-gonic/gin"
	"prod-mgmt/models"
	"strconv"
)

func List(c *gin.Context) {
	page, _ := strconv.Atoi(c.DefaultQuery("page", "1"))
	size, _ := strconv.Atoi(c.DefaultQuery("size", "3"))
	offset := (page - 1) * size

	var goods []models.Goods
	err := models.DB.Offset(offset).Limit(size).Find(&goods).Error
	if err != nil {

	}
}
func GoodAdd(c *gin.Context) {

}
